package com.vecspace.sso.entity;
/**
 */
public class AppFunctionAuthType implements java.io.Serializable{
	/**
	 * 
	 */
	
	public AppFunctionAuthType() {
		
	}
	
	public AppFunctionAuthType(Long funcId, int authType) {
		this.funcId = funcId;
		this.authType = authType;
	}
	
	private static final long serialVersionUID = 5426890664856415763L;
	private Long funcId;
	private int authType = 0;
	
	public Long getFuncId() {
		return funcId;
	}
	public void setFuncId(Long funcId) {
		this.funcId = funcId;
	}
	public int getAuthType() {
		return authType;
	}
	public void setAuthType(Integer authType) {
		if(authType == null) {
			this.authType = 0;
		}else {
			this.authType = authType;		
		}
	}

	/**返回funcId的字符串格式
	 * 
	 * @return 
	 * @author  wanghua
	 */
	public String getFuncKey(){
		return String.valueOf(funcId);		
	}
	public void setFuncKey(String funcKey){
		 
	}
	/**根据funcId判断是否相等
	 * 
	 */
	@Override
	public boolean equals(Object obj) {
		if(obj == null)return false;
		if(funcId == null)return false;
		AppFunctionAuthType oth = (AppFunctionAuthType)obj;
		return funcId.equals(oth.funcId);
	}
	
	@Override
	public int hashCode() {
		if(funcId == null)return 0;
		return funcId.hashCode();
	}
	
	public static final AppFunctionAuthType NONE = new AppFunctionAuthType(null, -1);
	public static final AppFunctionAuthType DEFAULT_AUTH = new AppFunctionAuthType(null, 1);
}
